package com.zbkj.crmeb.enums;

import java.util.Objects;

/**
 * 功能描述: 注册商户 门店 枚举
 * @Author: wangzh
 * @Date: 2023/4/24 16:27
 */
public enum StoreEnum {

    NO_STORE(1, "没有门店"),

    ONE_STORE(2, "有1家门店"),

    TWO_TO_TEN_STORE(3, "有2-10家门店"),

    MORE_THEN_TEN_STORE(4, "有10家以上门店"),
    ;

    private final Integer code;

    private final String msg;

    StoreEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static StoreEnum getMsgByCode(Integer code) {
        for (StoreEnum value : values()) {
            if (Objects.equals(value.getCode(), code)) {
                return value;
            }
        }
        return null;
    }
}
